<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">




<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！');
                history.back();
            }
        }
    })();
  </script>






<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />



  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico?v=5.1.4">







  <meta name="keywords" content="Swift," />





  <link rel="alternate" href="/atom.xml" title="Swift社区" type="application/atom+xml" />






<meta name="description" content="周报仓库：https://github.com/SwiftCommunityRes 前言译者言：周日立冬，北方多地迎来 2021 年的第一场雪，上海也降下大雨，此时你所在的城市降温了吗？记得添衣保暖，避免感冒生病影响工作和生活。 Xcode 13.2 Beta 版已具备并发支持，该特性将有助于解决很多 Swift 开发者的某些痛点。或许 Swift 内置的并发系统最重要的好处是，它允许以更简单的">
<meta name="keywords" content="Swift">
<meta property="og:type" content="article">
<meta property="og:title" content="Swift 周报 第六期">
<meta property="og:url" content="https://fanbaoying.github.io/Swift-周报-第六期/index.html">
<meta property="og:site_name" content="Swift社区">
<meta property="og:description" content="周报仓库：https://github.com/SwiftCommunityRes 前言译者言：周日立冬，北方多地迎来 2021 年的第一场雪，上海也降下大雨，此时你所在的城市降温了吗？记得添衣保暖，避免感冒生病影响工作和生活。 Xcode 13.2 Beta 版已具备并发支持，该特性将有助于解决很多 Swift 开发者的某些痛点。或许 Swift 内置的并发系统最重要的好处是，它允许以更简单的">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png">
<meta property="og:image" content="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png">
<meta property="og:image" content="https://files.mdnice.com/user/17787/9a7911bf-75f2-40f5-866b-3171868bb92c.jpg">
<meta property="og:updated_time" content="2021-11-08T07:28:00.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Swift 周报 第六期">
<meta name="twitter:description" content="周报仓库：https://github.com/SwiftCommunityRes 前言译者言：周日立冬，北方多地迎来 2021 年的第一场雪，上海也降下大雨，此时你所在的城市降温了吗？记得添衣保暖，避免感冒生病影响工作和生活。 Xcode 13.2 Beta 版已具备并发支持，该特性将有助于解决很多 Swift 开发者的某些痛点。或许 Swift 内置的并发系统最重要的好处是，它允许以更简单的">
<meta name="twitter:image" content="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://fanbaoying.github.io/Swift-周报-第六期/"/>





  <title>Swift 周报 第六期 | Swift社区</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    
    <a href="https://github.com/SwiftCommunityRes" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    
    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Swift社区</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">做最好的 Swift 社区</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://fanbaoying.github.io/Swift-周报-第六期/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Swift社区">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="https://avatars.githubusercontent.com/u/84354365?v=4">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Swift社区">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Swift 周报 第六期</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2021-10-25T11:27:35+08:00">
                2021-10-25
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Swift-周报/" itemprop="url" rel="index">
                    <span itemprop="name">Swift 周报</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                -->
                <span title="字数统计">
                  数字统计 2,235字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                --> 

                <span title="阅读时长">
                  阅读时长 8分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><img src="https://user-images.githubusercontent.com/24238160/138631090-e34763aa-7ed8-4b9a-8e02-4fa56d55b045.png" alt=""></p>
<p>周报仓库：<a href="https://github.com/SwiftCommunityRes" target="_blank" rel="noopener">https://github.com/SwiftCommunityRes</a></p>
<h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>译者言：周日立冬，北方多地迎来 2021 年的第一场雪，上海也降下大雨，此时你所在的城市降温了吗？记得添衣保暖，避免感冒生病影响工作和生活。</p>
<p><a href="https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes#Swift" target="_blank" rel="noopener">Xcode 13.2 Beta</a> 版已具备并发支持，该特性将有助于解决很多 Swift 开发者的某些痛点。或许 Swift 内置的并发系统最重要的好处是，它允许以更简单的方式，并行执行多异步任务。可以想像，通过增加执行任务的速度这将节省我们更多时间。</p>
<a id="more"></a>
<p><a href="https://twitter.com/fassko" target="_blank" rel="noopener">Kristaps Grinbergs</a> Swift 周报负责人在本期周报中公开自己将不再领导 Swift 周报项目，原文如下：</p>
<p>我非常高兴地编写这么优秀并且已经运营了三年的 Swift 新闻周报。我遇到了很多了不起的人，并且感谢你们所有人，我已经收获了很多！ 这是为什么打出下面这句话，让我感慨万千的原因。第 200 期周报将是我运营的最后一期。我已经决定不再领导这个项目，并且怀着愉悦的兴奋，我正在寻找愿意继续管理 Swift 周报的人。</p>
<blockquote>
<p>为了 Swift 社区周报持续稳定的发布更新，我们希望邀请 Swift 爱好者参与<strong>周报编辑</strong>，同时邀请赞助商对我们平台赞助支持。</p>
</blockquote>
<h2 id="入门任务"><a href="#入门任务" class="headerlink" title="入门任务"></a>入门任务</h2><p><strong>SR-15408</strong> [Swift-DocC] <a href="https://bugs.swift.org/browse/SR-15408" title="Building documentation with a fallback display name that includes a space produces a broken-looking article" target="_blank" rel="noopener">用含有空格的回调显示名称构建文档会产生一篇无法阅读的文章</a> </p>
<p><strong>译者注：</strong> 如果将带有空格的回调显示名称（如 –fallback-display-name “My Display Name”）以及有效的符号图传递给 DocC，DocC 会生成一篇以“我的显示名称”作为 H1 的文章标题并将其组织在顶级框架页面上的“文章”主题组下。</p>
<h2 id="新闻和社区"><a href="#新闻和社区" class="headerlink" title="新闻和社区"></a>新闻和社区</h2><p>新的 <a href="https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes#Swift" target="_blank" rel="noopener">Xcode 13.2 Beta</a> 增加了对 macOS 10.15、iOS 13、tvOS 13 和 watchOS 6 或更高版本的 Swift 并发支持。 这种支持包括<code>async/await</code>、<a href="https://developer.apple.com/documentation/swift/actor" target="_blank" rel="noopener">actor</a>、全局 <code>actor</code>，结构化的并发及其任务 API。</p>
<p><strong>Tim Condon</strong> 发布了 <a href="https://forums.swift.org/t/async-await-has-arrived-in-vapor/53077" title="Async/await has arrived in Vapor" target="_blank" rel="noopener">Vapor</a> 已经支持 <code>async/await</code>。</p>
<p><strong>Konrad ktoso Malawski</strong> 写了一篇介绍 <a href="https://www.swift.org/blog/distributed-actors/" title="Introducing Swift Distributed Actors" target="_blank" rel="noopener">Swift Distributed Actors</a> 的文章。</p>
<p><strong>Marc Aupont</strong> 将加入 Diversity in Swift 工作组。</p>
<p>Swift 下载链接已移至新位置以提供更快的下载速度！ 工具链将托管在 <a href="https://www.swift.org/download/" target="_blank" rel="noopener">download.swift.org</a>，它将使用与当前 URL 类似的模式。 要使用新 URL，请将 <strong>swift.org/builds/</strong> 替换为 <strong>download.swift.org/</strong>。 从 2021 年 10 月 26 日开始，<strong>swift.org/builds</strong> URL 已重定向到新的子域。</p>
<p><strong>Sarun Wongpatcharapakorn</strong> 写了一篇博文解释 Swift 中的 <a href="https://sarunw.com/posts/what-is-keypath-in-swift/" title="What is a KeyPath in Swift" target="_blank" rel="noopener">KeyPath</a>。</p>
<h2 id="Commits-和-pull-requests"><a href="#Commits-和-pull-requests" class="headerlink" title="Commits 和 pull requests"></a>Commits 和 pull requests</h2><p><strong>Erik Eckstein</strong> 合并了一个 <code>pull request</code>，该请求<a href="https://github.com/apple/swift/pull/39902" title="First prototype of Performance Annotations" target="_blank" rel="noopener">实现了性能注释的原型</a>，如 Swift 中的 <code>@_noLocks</code> 和 <code>@_noAllocation</code>。</p>
<p><strong>Slava Pestov</strong> 合并了一个 <code>pull request</code>，该请求<a href="https://github.com/apple/swift/pull/39918" title="RequirementMachine: Improved handling of identity conformances" target="_blank" rel="noopener">改进了对“身份一致性”的处理 [P].[P] =&gt; [P]</a>。</p>
<p><strong>John McCall</strong> 合并了一个 <code>pull request</code>，该请求<a href="https://github.com/apple/swift/pull/39829" title="Fix the alignment of future fragments for highly-aligned result types" target="_blank" rel="noopener">修复了高度对齐的结果类型的未来片段的对齐方式</a></p>
<h2 id="同意的提案"><a href="#同意的提案" class="headerlink" title="同意的提案"></a>同意的提案</h2><p><strong>SE-0325</strong> <a href="https://forums.swift.org/t/accepted-with-modifications-se-0325-additional-package-plugin-apis/53086" title="[Accepted with Modifications] SE-0325: Additional Package Plugin APIs" target="_blank" rel="noopener">附加包插件 API</a> 提案已被修改并同意。</p>
<h2 id="正在审查的提案"><a href="#正在审查的提案" class="headerlink" title="正在审查的提案"></a>正在审查的提案</h2><p><strong>SE-0326</strong>: <a href="https://forums.swift.org/t/se-0326-multi-statement-closure-parameter-result-type-inference/52964" title="Multi-statement closure parameter/result type inference" target="_blank" rel="noopener">多语句闭包参数/结果类型推断</a>正在审查中.</p>
<p><strong>Kristaps Grinbergs</strong> 建议通过启用闭包体的参数和结果类型推断，来改进多语句闭包推断行为。 这将令类型推断更符合开发者的预期，并且移除现存的行为壁垒，即向闭包添加一个表达式或语句会导致编译失败的结果。</p>
<p><strong>SE-0327</strong>: <a href="https://forums.swift.org/t/se-0327-on-actors-and-initialization/53053" title="On Actors and Initialization" target="_blank" rel="noopener">On Actors and Initialization</a>正在审查中。</p>
<p><strong>Actors</strong> 是 Swift 中相对较新的名义类型，为其可变态提供了数据竞争安全性。数据保护是通过将每个 <code>actor</code> 实例可变状态一次最多隔离一个任务来实现的。引入 <code>actor</code>（<a href="https://github.com/apple/swift-evolution/blob/main/proposals/0306-actors.md" title="Actors" target="_blank" rel="noopener">SE-0306</a>）的提案非常庞大和详细，但忽略了创建和销毁 <code>actor</code> 隔离状态的一些细微之处。 该提案旨在支持一个 <code>actor</code> 的定义，为了弄清一个 <code>actor</code> 实例的数据隔离何时开始和结束，以及在一个 <code>actor</code> 的 <code>init</code> 和 <code>deinit</code> 函数声明中能够做什么。</p>
<p><strong>SE-0328</strong>：<a href="https://forums.swift.org/t/se-0328-structural-opaque-result-types/53248" title="SE-0328: Structural opaque result types" target="_blank" rel="noopener">Structural opaque result</a> 类型正在审查中。</p>
<p><strong>Opaque</strong> 结果类型可以用作函数的结果类型、变量的类型或者下标的结果类型。在所有情况下， <strong>Opaque</strong> 结果类型必须是整个类型。该提案建议解除该限制，并且在“结构性”的位置中允许使用 <strong>Opaque</strong> 结果类型。</p>
<h2 id="Swift-论坛"><a href="#Swift-论坛" class="headerlink" title="Swift 论坛"></a>Swift 论坛</h2><h3 id="I"><a href="#I" class="headerlink" title="I"></a>I</h3><p>一个来自 <strong>@justkwin</strong> 关于 <code>Foundation</code> 如何使用 <code>URL</code> 结束来表示 <code>file.paths</code> 的小历史<a href="https://forums.swift.org/t/get-folders-number-of-elements/" title="Get Folder’s Number of Elements" target="_blank" rel="noopener">教训</a>。</p>
<h3 id="II"><a href="#II" class="headerlink" title="II"></a>II</h3><p><strong>Anders Bertelrud</strong> 提出了添加<a href="https://forums.swift.org/t/pitch-package-manager-command-plugins/53172" title="[Pitch] Package Manager Command Plugins" target="_blank" rel="noopener">包管理器命令插件的提案</a>。</p>
<p><strong>SE-0303</strong> 引入了第一种 SwiftPM 插件，专注于使用自定义构建工具调用扩展构建系统的能力（特别是为了生成源代码）。 那些插件一直计划成为第一种被 SwiftPM 支持的插件。</p>
<p><strong>Kristaps Grinbergs</strong> 想提出一个提案草案，为 SwiftPM 添加另一种更通用目的的“命令插件”。 这些类型的插件可以由用户直接调用，用于源代码格式化、文档生成、测试报告生成等。命令插件不一定与构建系统有任何关系。</p>
<p>这些自定义命令插件一个重要的方面是它们可以要求插件主机（SwiftPM 或支持包的 IDE）按需生成专门的信息，或着初始化构建或测试运行。 这是提案草案中最需要仔细审查的部分。 在使 API 足够丰富以令其尽可能有用，同时也使其足够通用以不仅在 SwiftPM 中而且 IDE 中支持 Swift 包，这里有一个相悖的因素。</p>
<h3 id="III"><a href="#III" class="headerlink" title="III"></a>III</h3><p><strong>Guillaume Lessard</strong> 提出了一项提案，该提案将实现<a href="https://forums.swift.org/t/pitch-pointer-family-initialization-improvements/53168" title="[Pitch] Pointer family initialization improvements" target="_blank" rel="noopener">指针族初始化改进</a>。</p>
<p><code>UnsafeMutablePointer</code> 系列中的类型通常需要手动管理内存分配，包括对其初始化状态的管理。 涉及的状态是在分配后:</p>
<ol>
<li>未绑定和未初始化时（当在 <code>UnsafeMutableRawPointer.allocate()</code> 返回）</li>
<li>绑定到一个类型，并且未初始化（从 <code>UnsafeMutablePointer&lt;T&gt;.allocate()</code> 返回）</li>
<li>绑定到一个类型，并且初始化</li>
</ol>
<p>无论何时它未曾被初始化，内存都能够安全地销毁。</p>
<p>不幸的是，不是每一个 <code>UnsafeMutablePointer</code> 系列中的类型有这个必要功能，以用于全面管理它内存初始化的状态。 我们打算在本提案中解决这个问题，并提供在各种更广泛的情况下管理初始化状态的功能。</p>
<h3 id="IV"><a href="#IV" class="headerlink" title="IV"></a>IV</h3><p><strong>Kelvin Ma</strong> 展开了一个关于 <code>AsyncStream</code> 构造函数的<a href="https://forums.swift.org/t/asyncstream-constructor-which-also-returns-its-continuation/53251" title="AsyncStream constructor which also returns its Continuation" target="_blank" rel="noopener">讨论</a>，该构造函数也返回其 <code>Continuation</code>。</p>
<p>有没有什么方法我们可以向 <code>AsyncStream</code> 添加一个 API，它直接返回 <code>Continuation</code>，从而我们就不必把它的闭包“调来调去”？</p>
<p>一般来说，我也觉得 <code>AsyncStream</code> 真的很难使用，因为迭代在创建了 <code>AsyncStream</code> 的同一个任务中发生，甚至是没有并发迭代时曾出现。 这使“订阅” <code>actor</code> 对象生成的事件变得困难，即使订阅方法被标记为 <code>nonisolated</code>。</p>
<h3 id="V"><a href="#V" class="headerlink" title="V"></a>V</h3><p><strong>Adam Fowler</strong> 积极将 <code>MQTTNIO</code> 库<a href="https://forums.swift.org/t/mqttnio/53238" title="Mqttnio" target="_blank" rel="noopener">加入 SSWG 包列表中</a>.</p>
<p>MQTT 是一种通常用于与 IoT（物联网）设备进行通信的消息传递协议。 它是一种轻量级的发布/订阅消息传输，旨在具有较小的代码占用空间和网络带宽。</p>
<h3 id="VI"><a href="#VI" class="headerlink" title="VI"></a>VI</h3><p><strong>Cory Benfield</strong> 向我们<a href="https://forums.swift.org/t/swiftnio-swift-version-support/53232" title="SwiftNIO Swift version support" target="_blank" rel="noopener">更新了</a>关于 <code>SwiftNIO Swift</code> 版本支持。</p>
<p>SwiftNIO 团队已将其作为我们工作流程的主要支柱，以尝试在相当长的时间内支持 Swift 版本。大多数用户没有利用这一点，更愿意继续使用最新版本的 Swift，但我们认为重要的是你要有信心，新编写的应用程序将在未来获得一些有意义的支持。</p>
<h3 id="VII"><a href="#VII" class="headerlink" title="VII"></a>VII</h3><p><strong>Victoria Mitchell</strong> <a href="https://forums.swift.org/t/extending-swift-docc-to-support-objective-c-documentation/53243" title="Extending Swift-DocC to support Objective-C documentation" target="_blank" rel="noopener">写了一篇</a>关于扩展 <code>Swift-DocC</code> 以支持 <code>Objective-C</code> 的文档。</p>
<p><code>DocC</code> 的架构目前仅支持 <code>Swift</code> 一个语言的渲染符号文档。然而，有些跨语言项目可以从将多个“语言变体”收集到同一组文档中受益，例如可以被 <code>Swift</code> 中调用的 <code>Objective-C</code> API，反之亦然。</p>
<h2 id="关于我们"><a href="#关于我们" class="headerlink" title="关于我们"></a>关于我们</h2><p>公众号是由 Swift 爱好者共同维护，我们会分享以 Swift 实战、SwiftUI、Swift 基础为核心的技术内容，也整理收集优秀的学习资料。欢迎关注公众号：<strong>Swift社区</strong>，后台点击进群，联系我们获取更多内容。</p>
<p><img width="500" alt="Swift社区" src="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png"></p>
<p>感谢 SwiftWeekly 与我们的合作，开启 Swift 周报中文版发布之旅。周报仓库：<a href="https://github.com/SwiftCommunityRes" target="_blank" rel="noopener">https://github.com/SwiftCommunityRes</a></p>
<p>后续还会翻译大量资料到我们公众号，有感兴趣的朋友，可以加入我们，扫码添加微信</p>
<div align="center"><br><img width="300" alt="fzhanfei" src="https://files.mdnice.com/user/17787/9a7911bf-75f2-40f5-866b-3171868bb92c.jpg"><br></div>


      
    </div>
    
    
    
    

    
      <div>
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

      </div>
    


    
      <div>
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/Swift-周报-第六期/">Swift 周报 第六期</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 Swift社区 的个人博客">Swift社区</a></p>
  <p><span>发布时间:</span>2021年10月25日 - 11:10</p>
  <p><span>最后更新:</span>2021年11月08日 - 15:11</p>
  <p><span>原始链接:</span><a href="/Swift-周报-第六期/" title="Swift 周报 第六期">https://fanbaoying.github.io/Swift-周报-第六期/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://fanbaoying.github.io/Swift-周报-第六期/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
      $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
        });
    });  
</script>

      </div>
    


    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="Swift社区 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.png" alt="Swift社区 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Swift/" rel="tag"><i class="fa fa-tag"></i> Swift</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/Swift-周报-第四期/" rel="next" title="Swift 周报 第四期">
                <i class="fa fa-chevron-left"></i> Swift 周报 第四期
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/Swift-周报-第五期/" rel="prev" title="Swift 周报 第五期">
                Swift 周报 第五期 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到：</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>

<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
  data_track_clickback:true,
  summary:"",
  shortUrl:false,
  hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=" charset="utf-8"></script>
<!-- JiaThis Button END -->
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="https://avatars.githubusercontent.com/u/84354365?v=4"
                alt="Swift社区" />
            
              <p class="site-author-name" itemprop="name">Swift社区</p>
              <p class="site-description motion-element" itemprop="description">我们的使命是做一个最专业最权威的 Swift 中文社区，我们的愿景是希望更多的人学习和使用Swift。我们会分享以 Swift 实战、SwiftUI、Swift 基础为核心的技术干货，不忘初心，牢记使命。</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">187</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">19</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">11</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://blog.csdn.net/qq_36478920" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://juejin.im/user/5a30d987f265da430d580126" target="_blank" title="掘金">
                      
                        <i class="fa fa-fw fa-spinner"></i>掘金</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/fanbaoying" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.zhihu.com/people/swift-community" target="_blank" title="知乎">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>知乎</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/u/7711465033" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i>微博</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzAxNzgzNTgwMw==&action=getalbum&album_id=2024314764775981057" target="_blank" title="公众号">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>公众号</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftWeekly" title="SwiftWeekly" target="_blank">SwiftWeekly</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/article-ios" title="Article-ios" target="_blank">Article-ios</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftUI-Book" title="SwiftUI-Book" target="_blank">SwiftUI-Book</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#入门任务"><span class="nav-number">2.</span> <span class="nav-text">入门任务</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#新闻和社区"><span class="nav-number">3.</span> <span class="nav-text">新闻和社区</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Commits-和-pull-requests"><span class="nav-number">4.</span> <span class="nav-text">Commits 和 pull requests</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#同意的提案"><span class="nav-number">5.</span> <span class="nav-text">同意的提案</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#正在审查的提案"><span class="nav-number">6.</span> <span class="nav-text">正在审查的提案</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Swift-论坛"><span class="nav-number">7.</span> <span class="nav-text">Swift 论坛</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#I"><span class="nav-number">7.1.</span> <span class="nav-text">I</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#II"><span class="nav-number">7.2.</span> <span class="nav-text">II</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#III"><span class="nav-number">7.3.</span> <span class="nav-text">III</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#IV"><span class="nav-number">7.4.</span> <span class="nav-text">IV</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#V"><span class="nav-number">7.5.</span> <span class="nav-text">V</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#VI"><span class="nav-number">7.6.</span> <span class="nav-text">VI</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#VII"><span class="nav-number">7.7.</span> <span class="nav-text">VII</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#关于我们"><span class="nav-number">8.</span> <span class="nav-text">关于我们</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Swift社区</span>

  
</div>

<!-- 
<div class="powered-by">
  <i class="fa fa-user-md">
  </i>
  <span id="busuanzi_container_site_uv">
    已有<span id="busuanzi_value_site_uv"></span>人来访
  </span>

</div>


  <span class="post-meta-divider">|</span>


<div class="powered-by">
  <i class="fa fa-eye"></i>
  <span id="busuanzi_container_site_pv">
      访问量<span id="busuanzi_value_site_pv"></span>次
  </span>
</div>



  <span class="post-meta-divider">|</span>


-->

<div class="theme-info">
  <i class="fa fa-pencil"></i>
  <span class="post-count">博客全站共361.6k字</span>
</div>


<!-- 
  <span class="post-meta-divider">|</span>



  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>



-->

        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
